package com.example.rustfs.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.Instant;

/**
 * 文件信息 DTO
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class FileInfo {
    
    private String name;
    private String key;
    private Long size;
    private Instant lastModified;
    private String type;
    private String icon;
    private String formattedSize;

    public boolean isDirectory() {
        return "folder".equals(type);
    }
}

